package org.easy.feign.controller;

import org.easy.feign.api.RemoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Packge org.easy.feign.controller
 * @Autor linNaibin
 * @Description
 * @Version 1.0
 * @Date 2021/9/26 11:07
 */
@RestController
@RequestMapping("/")
public class DemoController {

    @GetMapping("demo/{id}")
    public String demo(@PathVariable(value = "id") Integer id) {

        System.out.println("参数:" + id);
        return "这是demo!";
    }

    @Autowired
    private RemoteService remoteService;

    @GetMapping("test")
    public String test() {
        remoteService.remoteDemo(222);
        return "";
    }


}
